Content aware pattern stamp tool

ABSTRACT

A content aware pattern stamping tool that preserves the visual texture of an area within an image when filling the area with a pattern is provided. In one embodiment, the pattern stamping tool analyzes an area to be filled with a pattern to determine textural characteristics of the area. These textural characteristics may include reflectance and shading. Once the pattern stamping tool has determined the textural characteristics of the area, the pattern stamping tool fills the area with the pattern and applies the textural characteristics to the filled area. Through application of the textural characteristics, the pattern stamping tool generates an image that combines the pattern with the original textural characteristics of the area.

FIELD OF THE DISCLOSURE

This disclosure relates to techniques of editing content, and moreparticularly, to techniques of modifying images to include additionalcontent.

BACKGROUND

The software industry has developed numerous programs to allow users togenerate or edit various types of content. This content may includedrawings or other images, video, text, and the like. The programsprovide many benefits in generating and editing content. For example,image editing programs enable users to create new images or alterexisting images. User initiated changes to these images may includeadding shapes, adding text, numbers, or other symbols, and shading,blurring, or filtering features of an image. Some conventional contentediting programs include tools that enable a user to designate an areaof an image to be filled or “stamped” with a predefined pattern (e.g.,such as the pattern stamp tool provided in Adobe® Photoshop®). Thesepredefined patterns may range from simple, solid colors to complex,polychromatic images. When stamping an area with a pattern, conventionalprograms simply replace the area with the pattern, repeating anyportions of the pattern as necessary to overwrite all portions of thedesignated area.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed incolor. Copies of this patent or patent application publication withcolor drawings will be provided by the Office upon request and paymentof the necessary fee.

FIG. 1 is a block diagram illustrating an example content editing devicein accordance with one or more embodiments of the present disclosure.

FIG. 2 is a flowchart illustrating an example content editing process inaccordance with one or more embodiments of the present disclosure.

FIG. 3 is a flowchart illustrating an example texture determinationprocess in accordance with one or more embodiments of the presentdisclosure.

FIG. 4 is an input image in accordance with one or more embodiments ofthe present disclosure.

FIG. 5 is an x gradient image in accordance with one or more embodimentsof the present disclosure.

FIG. 6 is a y gradient image in accordance with one or more embodimentsof the present disclosure.

FIG. 7 is a total gradient image in accordance with one or moreembodiments of the present disclosure.

FIG. 8 is a shading image in accordance with one or more embodiments ofthe present disclosure.

FIG. 9 is a reflectance image in accordance with one or more embodimentsof the present disclosure.

FIG. 10 is an image representation of an illumination map in accordancewith one or more embodiments of the present disclosure.

FIG. 11 is an output image in accordance with one or more embodiments ofthe present disclosure.

FIG. 12 is an output image in accordance with one or more conventionalcontend editing tools.

DETAILED DESCRIPTION

Conventional pattern stamping tools provide the ability to makesubstantial modifications to an image in a short period of time, byfilling that area with a selected pattern. However, such tools sufferfrom disadvantages, depending on the image being modified. For example,images that include idiosyncratic textural elements may not be amenableto modifications that simply replace an area with a pattern, as doing somay yield unrealistic results. FIG. 4 illustrates an example image thatis not amenable to conventional pattern stamping. As shown, FIG. 4includes an area 400. This area 400 depicts a blanket. The area 400includes shaded regions 402 and reflective regions 404. As can be seen,the shaded regions 402 and the reflective regions 404 contribute to therealistic appearance of the blanket and the figure as a whole. FIG. 12illustrates an example image that has been processed by a conventionalpattern stamping tool. As shown, FIG. 12 includes an area 1200 thatcorresponds to the area 400. The area 1200 has been filled with a polkadot pattern. As can be seen, the area 1200 is devoid of shade orreflection. This lack of visual texture in the area 1200 results in anunrealistic appearance.

To aid the reader's understanding of various example embodimentsdisclosed herein, some terminology used to describe these embodimentswill now be presented. As referred to herein, a pattern stamp componentis a hardware and/or software component configured to fill (e.g.,overwrite) a selected area of an image with a pattern. As referred toherein, an area of an image is a subset of the image. Thus, an area mayrange from a single pixel of an image to all pixels included in theimage. As referred to herein, a pattern is set of pixels. Thus a patternmay range from a simple group of monochromatic pixels to a complexpolychromatic group of pixels. Some pattern stamp components describedherein utilize an illumination map to fill a selected area with atextured pattern. As referred to herein, an illumination map is a set ofvalues descriptive of a texture (e.g., shading and reflectance) withinan area of an image. Within some embodiments, the illumination map isused to apply a texture to a pattern. As referred to herein, a texturedpattern is a pattern that has been modified to have texturalcharacteristics (e.g., shading and reflectance) of an area of an image.

To address disadvantages of conventional pattern stamping tools,improved pattern stamping techniques are disclosed herein. Unlikeexisting techniques that blindly fill the object area, the techniquesare content-aware in that they consider the underlying properties of theimage area on which they are being applied. By considering the intrinsicproperties of the target area to be filled, a more realistic resultingtexture can be achieved. To this end, some embodiments disclosed hereinimplement a content aware pattern stamping tool that preserves thevisual texture of an area within an image when filling the area with apattern. For example, in one embodiment, the pattern stamping toolanalyzes an area to be filled with a pattern to determine texturalcharacteristics of the area. These textural characteristics may include,for example, reflectance and shading. Reflectance in an image describeshow the surfaces depicted in the image reflect light from the source ofillumination from the perspective of the camera. A highly reflectivesurface in the image may appear lighter than its natural chromaticity.Shading in an image results when some amount of light from a source ofillumination is prevented from reaching a surface. Shading occurs viainteraction between surfaces depicted in the image and the source ofillumination for the image and depends on the position and orientationof the surfaces and the source of illumination. For instance, someintervening surfaces may be positioned between the source ofillumination and other surfaces. In this situation, the other surfacesmay appear darker than their natural chromaticity due to shade createdby the intervening surfaces. Together, shading and reflectancecontribute substantially to the textural identity of many images. Insome embodiments, once the pattern stamping tool has determined thetextural characteristics of an area to be filled or otherwise patterned,the pattern stamping tool fills the area with the desired pattern andapplies the identified textural characteristics to the filled area.Thus, the pattern stamping tool generates an image that combines theselected pattern with the original textural characteristics of the area.

In accordance with some embodiments of the present disclosure, a patternstamp component that preserves textural characteristics of images isprovided. In some embodiments, the pattern stamp component isimplemented by and within a programmable device, which in turn may bepart of a larger distributed computing system. For instance, the patternstamp component may be a part of a content editing program and systemthat enables users to modify images by changing data descriptive of theimages. The editing system may be implemented, for example, as a desktopapplication locally installed into a computer system (e.g., desktop,laptop, tablet, etc), or in the context of a client-server arrangementwhere the editing system is offered as part of a cloud-based serviceaccessible from a server to a client computer via a network.

In some embodiments, the pattern stamp component is programmed orotherwise configured to replicate textural characteristics presentwithin an original area of an image to a new area that has been selectedfor pattern stamping by a user. When executing according to thisconfiguration, the pattern stamp component first identifies an area tobe stamped and determines textural characteristics of the area. In someembodiments, the pattern stamp component determines both shading andreflectance characteristics of the area by decomposing the area into twoimages: a shading image and a reflectance image. The shading imagecontains the shading of each pixel in the area. The reflectance imagecontains the reflectance at each pixel in the area. Various embodimentsmay operate at a variety of resolutions, thus the area and/or theshading and reflectance images may include one or more blocks of pixelsor other portions of the input image.

In some embodiments, the pattern stamp tool is programmed or otherwiseconfigured to recover the shading and reflectance images from estimatedderivatives of the images. In these embodiments, the pattern stampcomponent first computes derivatives within the area. This derivativecomputation may be performed using, for example, a Sobel filter. Next,the pattern stamp component classifies each derivative as being causedby a change in either shading or reflectance. This classification may beperformed by determining whether changes between color values ofadjacent pixels are proportional. If so, the changes, and theircorresponding to the derivatives, are caused by shading. If not, thechanges, and their corresponding derivatives may be caused byreflectance. Next, in these embodiments, the pattern stamp componentintegrates the classified derivatives to determine both the shading andreflectance images.

In some embodiments, the pattern stamp component is programmed orotherwise configured to generate an illumination map based on theshading and reflectance images, to fill the area with the pattern, andto apply the illumination map to the filled area. In some embodiments,the pattern stamp component generates the illumination map bymultiplying each pixel of the shading image by a corresponding pixel inthe reflectance image. In other embodiments, the pattern stamp componentapplies the illumination map to the filled area by multiplying eachpixel in the filled area by a corresponding pixel in the illuminationmap.

Still other aspects, embodiments and advantages of these example aspectsand embodiments, are discussed in detail below. Moreover, it is to beunderstood that both the foregoing information and the followingdetailed description are merely illustrative examples of various aspectsand embodiments, and are intended to provide an overview or frameworkfor understanding the nature and character of the claimed aspects andembodiments. References to “an embodiment,” “other embodiments,” “anexample,” “some embodiments,” “some examples,” “an alternateembodiment,” “various embodiments,” “one embodiment,” “at least oneembodiment,” “another embodiment,” “this and other embodiments” or thelike are not necessarily mutually exclusive and are intended to indicatethat a particular feature, structure, or characteristic described inconnection with the embodiment or example may be included in at leastone embodiment or example. The appearances of such terms herein are notnecessarily all referring to the same embodiment or example. Anyembodiment or example disclosed herein may be combined with any otherembodiment or example.

Also, the phraseology and terminology used herein is for the purpose ofdescription and should not be regarded as limiting. Any references toexamples, embodiments, components, elements, or acts of the systems andmethods herein referred to in the singular may also embrace embodimentsincluding a plurality, and any references in plural to any embodiment,component, element or act herein may also embrace embodiments includingonly a singularity. References in the singular or plural form are notintended to limit the presently disclosed systems or methods, theircomponents, acts, or elements. The use herein of “including,”“comprising,” “having,” “containing,” “involving,” and variationsthereof is meant to encompass the items listed thereafter andequivalents thereof as well as additional items. References to “or” maybe construed as inclusive so that any terms described using “or” mayindicate any of a single, more than one, and all of the described terms.In addition, in the event of inconsistent usages of terms between thisdocument and documents incorporated herein by reference, the term usagein the incorporated references is supplementary to that of thisdocument; for irreconcilable inconsistencies, the term usage in thisdocument controls.

System Architecture

Various embodiments disclosed herein implement a pattern stamp componentwithin one or more programmable devices. These programmable devices mayinclude any device that processes information. Examples of commonprogrammable devices include personal computers, workstations, servers,cellular telephones, and personal digital assistants. FIG. 1 illustratesone example in accord with some of the embodiments disclosed herein, acontent editing device 100. As shown in FIG. 1, the content editingdevice 100 includes a processor 124, a memory 126, an interconnectionmechanism 128, one or more interfaces 130, a content editing program106, and a pattern stamp component 108.

As illustrated in FIG. 1, the content editing device 100 includes asuite of components that are standard for a programmable device. Thesecomponents are the processor 124, the memory 126, the interconnectionmechanism 128, and the interfaces 130. The particular manufacturer andmodel of any standard component may vary between the embodimentsdisclosed herein.

The interfaces 130 include one or more physical interface devices suchas input devices, output devices, and combination input/output devicesand a software stack configured to drive operation of the devices.Interface devices may receive input or provide output. Moreparticularly, output devices may render information for externalpresentation. Input devices may accept information from externalsources. Examples of interface devices include keyboards, mouse devices,trackballs, microphones, touch screens, printing devices, displayscreens, speakers, accelerometers, network interface cards, etc.Interface devices allow programmable devices to exchange information andto communicate with external entities, such as users and other systems.

The interconnection mechanism 128 is a communication coupling betweenthe processor 124, the memory 126, and the interfaces 130. Theinterconnection mechanism 128 may include one or more physical busses inconformance with specialized or standard computing bus technologies suchas IDE, SCSI, PCI, and InfiniBand. The interconnection mechanism 128enables communications, including instructions and data, to be exchangedbetween the processor 124, the memory 126, and the interfaces 130.

The memory 126 includes readable and/or writeable data storage thatstores programs and data used or manipulated during operation of aprogrammable device. The programs stored in the memory 126 are a seriesof instructions that are executable by the processor 124. The memory 126may include relatively high performance data storage, such as registers,caches, dynamic random access memory, and static memory. The memory 126may further include a relatively low performance, non-volatile datastorage medium such as flash memory or an optical or magnetic disk.Various embodiments may organize the memory 126 into particularized and,in some cases, unique structures to store data in support of thecomponents disclosed herein. These data structures may be specificallyconfigured to conserve storage space or increase data exchangeperformance and may be sized and organized to store values forparticular data and types of data.

To implement specialized components of some embodiments, the processor124 executes a series of instructions (i.e., one or more programs) thatresult in manipulated data. The processor 124 may be any type ofprocessor, multiprocessor, microprocessor, or controller known in theart. The processor 124 is connected to and communicates data with thememory 126 and the interfaces 130 via the interconnection mechanism 128.In operation, the processor 124 causes data to be read from anon-volatile (i.e., non-transitory) data storage medium in the memory126 and written to high performance data storage. The processor 124manipulates the data within the high performance data storage, andcopies the manipulated data to the data storage medium after processingis completed.

In addition to the standard suite of components described above, thecontent editing device 100 includes customized components. For example,as shown in FIG. 1, these customized components include the contentediting program 106 and the pattern stamp component 108.

In some embodiments, the processor 124 is configured to implement thecontent editing program 106. The content editing program 106 may be anyof a variety of different computer programs, such as applications,operating system components, and so forth. In some embodiments, thecontent editing program 106 is an image editing program configured tocapture, edit, or otherwise manipulate data descriptive of one or moreimages. The content editing program 106 may alternatively be other typesof programs, such as a video editing program configured to capture,edit, or otherwise manipulate data descriptive of video (e.g., multipleimage frames). When executing according to its configuration, thecontent editing program 106 receives user input that identifies variousactions to be executed on the data such as by adding to the data,removing parts of the data, modifying parts of the data, and so forth.In this way, lines, patterns, or shapes may be added, opacity of imagesmay be increased or decreased, colors may be changed, various otherfilters may be applied to change the appearance of images, and so forth.The particular actions that may be executed vary based on the particularcontent editing program 106. In at least one embodiment, when executingin accordance with its configuration, the content editing program 106executes a content editing process, such as the content editing process200 described further below with reference to FIG. 2.

In some embodiments, the content editing program 106 is configured toinitiate execution of the pattern stamp component 108 in response toreceiving user input requesting an area of an image be filled with aselected pattern. In some embodiments, the pattern stamp component 108is configured to determine textural characteristics of the area, stampthe area with the pattern, and apply the characteristics to the stampedarea. In at least one embodiment, when executing according to itsconfiguration, the pattern stamp component 108 executes a patternstamping process described further below with reference to FIGS. 3 and4.

In some embodiments, the components disclosed herein may create, read,update, and delete parameters that affect the functions performed by thecomponents. These parameters may be physically stored in any form ofsuitable memory including volatile memory or non-volatile memory. Inaddition, the parameters may be logically stored in a propriety datastructure (such as a database or file defined by a user spaceapplication) or in a commonly shared data structure (such as anapplication registry that is defined by an operating system). Inaddition, some examples provide for both system and user interfacecomponents that allow external entities to modify the parameters andthereby configure the behavior of the components.

Although an embodiment implementing particular functionality isdiscussed herein with reference to particular components, it should benoted that, in other embodiments, the functionality of individualcomponents can be separated into multiple components, and/or at leastsome functionality of multiple components can be combined into a singlecomponent. Information may flow between the any of the componentsdescribed herein using a variety of techniques. Such techniques include,for example, passing the information over a network using standardprotocols, such as TCP/IP or HTTP or HTTPS, and passing the informationbetween components via data structures written in shared volatile ornon-volatile memory. In addition, pointers or other references toinformation may be transmitted and received in place of, in combinationwith, or in addition to, copies of the information. Conversely, theinformation may be exchanged in place of, in combination with, or inaddition to, pointers or other references to the information. Othertechniques and protocols for communicating information may be usedwithout departing from the scope of the examples and embodimentsdisclosed herein.

Although the content editing device 100 is shown by way of example as atype of programmable device capable of executing the processes disclosedherein, embodiments are not limited to being implemented on theprogrammable devices shown in FIG. 1. Various processes may be practicedon one or more programmable devices having a different architectures orcomponents than those shown in FIG. 1. For instance, a programmabledevice may include specially programmed, special-purpose hardware, suchas an application-specific integrated circuit (ASIC), afield-programmable gate array (FPGA), a complex programmable logicdevice (CPLD), and other implementations in silicon or other hardwaretailored to execute processes disclosed herein. Thus, components of aprogrammable device as disclosed herein may be implemented in software,hardware, firmware, or any combination thereof.

As described above, some embodiments execute content editing processes.For example, in at least one embodiment, the content editing device 100implements the content editing program 106 which, in turn, executes acontent editing process 200 illustrated in FIG. 2.

The content editing process 200 begins with act 202 where the contentediting program provides content to a user. This content may include,for example, an image (e.g., the image of FIG. 4) provided via a userinterface (e.g., within the interfaces 130). In act 204, the contentediting program receives user input via the user interface. The userinput may specify a request to act upon the content. In act 206, thecontent editing program parses the input and determines whether theinput specifies a request to stamp an area of the image with a pattern.If the input specifies such a stamping request, the content editingprogram implements a pattern stamp component (e.g., the pattern stampcomponent 108) which, in turn, executes act 212. If the input does notspecify a stamping request, the content editing program executes act208.

In the act 208, the content editing program determines whether the inputspecifies a request to exit the content editing program. If the inputspecifies a request to exit the content editing program, the contentediting program terminates the content editing process 200. If the inputdoes not specify a request to exit the program, the content editingprogram executes act 210. In the act 210, the content editing programexecutes an action specified by the input.

In the act 212, the pattern stamp component identifies an area to stampby parsing the stamping request specified by the input. In act 214, thepattern stamping component determines textural characteristics of thearea. One example of an texture determination process 300 executed bythe pattern stamp component in the act 212 is described further belowwith reference to FIG. 3. In act 216, the pattern stamp component fillsthe area with the pattern.

In act 218, the pattern stamp component applies the determined texturalcharacteristics to the stamped area. In one embodiment, the patternstamp component applies the textural characteristics by multiplying theRGB values of each pixel within the stamped area by a correspondingentry within an illumination map. This illumination map is describedfurther below with reference to FIGS. 3 and 10.

As described above, some embodiments execute texture determinationprocesses. For example, in at least one embodiment, the content editingdevice 100 implements the pattern stamp component 108 which, in turn,executes an texture determination process 300 illustrated in FIG. 3.

The texture determination process 300 begins with act 302 where apattern stamp component (e.g., the pattern stamp component 108) computesx and y derivatives of the area of the image. In at least oneembodiment, the pattern stamp component computes the x and y derivativesby applying a filter, such as a Sobel filter, to data descriptive of theimage.

In act 304, the pattern stamp component classifies each of the x and yderivatives as measuring a change in either shading or reflectance. Toperform this classification in at least one embodiment, the patternstamp component first allocates a three-dimensional vector for eachpixel in the area and populates each vector with the RBG value tripletsof a pixel. Next, the pattern stamp component normalizes the vectors andcomputes a dot product of each pair of pixels that are horizontally orvertically adjacent. Finally, the pattern stamp component compares thevalue of the dot products to configurable ranges of tolerance. Where thevalue of the dot product falls inside a first configurable range oftolerance, the x or y derivative corresponding to the dot product isclassified as a reflectance derivative. In one embodiment, the firstconfigurable range is [0.5, 0.8]. Where the value of the dot productfalls inside a second configurable range of tolerance, the x or yderivative corresponding to the dot product is classified as a shadingderivative. In one embodiment, the second configurable range is [0.95,1]. Where the value of the dot product falls outside the first andsecond configurable ranges of tolerance, the dot product classificationmethod is inconclusive. For non-conclusive classifications, the patternstamp tool propagates classifications from conclusive image pixels toinconclusive image pixels using a standard method (e.g., Markov RandomField). When executing a Markov Random Field method, the pattern stamptool propagates a classification along pixels that are located within acontour in the image. In this way, the act 304 classifies eachderivative into either a shading derivative or a reflectance derivative.

In act 306, the pattern stamp component recovers the shading image byintegrating the shading derivatives. For example, in one embodiment, thepattern stamp component determines each pixel S(x, y) of the shadingimage using the following Equation 1.S(x,y)=g*[(fx(−x,−y)*Fx)+(fy(−x,−y)*Fy)]  Equation 1

In Equation 1, Fx and Fy are estimated shading derivatives identified inthe act 304, fx( ) and fy( ) are filters (e.g., a Sobel filter) thatgenerate x and y derivatives, “*” indicates the convolution operation,f(−x, −y) is a reversed copy of f(x, y), and g is the solution of thefollowing Equation 2.g*[(fx(−x,−y)*fx(x,y))+(fy(−x,−y)*fy(x,y))]=δ  Equation 2

In Equation 2, g*[(fx(−x, −y)*fx(x, y))+(fy(−x, −y)*fy(x, y))] will beminimized as δ tends to zero.

In act 308, the pattern stamp component constructs the reflectance imageby integrating the reflectance derivatives. For example, in oneembodiment, the pattern stamp component determines each pixel R(x, y) ofthe reflectance image using the following Equation 3.R(x,y)=g*[(fx(−x,−y)*Fx)+(fy(−x,−y)*Fy)]  Equation 3

In Equation 3, Fx and Fy are estimated reflectance derivativesidentified in the act 304, fx( ) and fy( ) are filters (e.g., a Sobelfilter) that generate x and y derivatives, “*” indicates the convolutionoperation, f(−x, −y) is a reversed copy of f(x, y), and g is thesolution of the Equation 2 described above.

In act 310, the pattern stamp component generates an illumination mapfrom the shading image and the reflectance image. For example, in oneembodiment, the pattern stamp component determines each pixel, I(x, y),of the illumination map using the following Equation 4.I(x,y)=R(x,y)*S(x,y)  Equation 4

In Equation 4, “*” indicates the multiplication operation. In someembodiments, the pattern stamp component normalizes each pixel, I(x, y),of the illumination map using the following Equation 5.I(x,y)=[R(x,y)*S(x,y)]/255  Equation 5

In Equation 5, “*” indicates the multiplication operation.

Processes in accord with the texture determination process 300 enablepattern stamp components to generate an illumination map. Thisillumination map may be applied to a new pattern to generate a realisticrendition of an area that combines the characteristics of the area withthe new pattern.

A particular example in accord with various embodiments will now bedescribed with reference to FIGS. 4-11. FIGS. 4-11 illustrate imagesthat are processed during execution of a content editing process (e.g.the content editing process 200) by a content editing device (e.g., thecontent editing device 100).

According to this example, a user (e.g., the user 106) enters input thatspecifies a request to edit the image illustrated in FIG. 4. In responseto receiving this input, the content editing device parses the input,executes a content editing program (e.g., the content editing program106), and passes an identifier of the image illustrated in FIG. 4 to thecontent editing program.

In this example, the content editing program executes the act 202 toprovide the image illustrated in FIG. 4 to the user via a user interface(e.g., within the interfaces 130). The content editing program executesthe act 204 to receive input from the user that specifies a request tostamp the area 400 with a pattern. The content editing program executesthe act 206 to parse the input and identify the request as a stampingrequest. The content editing program also initiates, during execution ofthe act 206, a pattern stamp component (e.g., the pattern stampcomponent 108) in response to identifying the request as a stampingrequest.

Continuing this example, the pattern stamp component executes the act212 to identify the area selected for stamping. The pattern stampcomponent executes the act 214 to determine the textural characteristicsof the selected area. Within the act 214, the pattern stamp componentexecutes a texture determination process (e.g., the texturedetermination process 300).

Next, the pattern stamp component executes the act 302 to compute the xand y derivatives of the area 400. FIG. 5 graphically illustrates the xderivatives. FIG. 6 graphically illustrates the y derivatives. FIG. 7graphically illustrates the combination of the x and y derivatives. Thepattern stamp component executes the act 304 to classify each of the xand y derivatives as either a shading derivative or a reflectancederivative. The pattern stamp component executes the act 306 todetermine a shading image of the selected area by integrating theshading derivatives. FIG. 8 illustrates the shading image. The patternstamp component executes the act 308 to determine a reflectance image ofthe selected area by integrating the reflectance derivatives. FIG. 9illustrates the reflectance image. The pattern stamp component executesthe act 310 to generate an illumination map by combining the shadingimage and the reflectance image into a normalized, grayscale image. FIG.10 graphically illustrates the illumination map.

Continuing this example, the pattern stamp component executes the act216 to fill the area with the pattern. The pattern stamp componentexecutes the act 218 to apply the illumination map to the pattern bymultiplying each pixel in the area by its corresponding normalizedgrayscale value in the illumination map. FIG. 11 illustrates the outputimage provided by the content editing program after execution of the act202 following execution of the act 218.

Each of the processes described herein depict one particular sequence ofacts in a particular example. The acts included in these processes maybe performed by, or using, one or more programmable devices speciallyconfigured as discussed herein. Some acts are optional and, as such, maybe omitted in accord with one or more examples. Additionally, the orderof acts can be altered, or other acts can be added, without departingfrom the scope of the embodiments discussed herein. Furthermore, asdiscussed above, in at least one example, the acts are performed on aparticular, specially configured machine, namely a content editingdevice configured according to the examples and embodiments disclosedherein.

Further Example Embodiments

According to one embodiment, a content editing device is provided. Thecontent editing device includes memory storing image data descriptive ofan image, at least one processor coupled to the memory, and a patternstamp component executable by the at least one processor. The patternstamp component is configured to generate an illumination mapdescriptive of a texture within an area of the image, fill the area witha pattern, and apply the illumination map to the area to generate atextured pattern within the area.

In the content editing device, the illumination map may be descriptiveof shading and reflectance at each pixel within the area. Theillumination map may include a grayscale value corresponding to eachpixel within the area. The area may be described by a subset of theimage data. The pattern stamp component may be configured to apply theillumination map at least in part by multiplying one or more valuesdescriptive of each pixel in the area with a corresponding value in theillumination map.

In the content editing device, the pattern stamp component may beconfigured to generate the illumination map at least in part by beingconfigured to compute derivatives of the area, classify each derivativeas either a shading derivative or a reflectance derivative, integratederivatives classified as shading derivatives into a shading image,integrate derivatives classified as reflectance derivatives into areflectance image, and multiply at least one value of each pixel of theshading image by at least one value of each pixel of the reflectanceimage to generate at least one value of each pixel of the illuminationmap. The pattern stamp component may be configured to classify eachderivative at least in part by being configured to identify a firstpixel within the area, the first pixel corresponding to the derivativebeing classified; identify a second pixel within the area, the secondpixel corresponding to the derivative being classified; generate a firstvector for the first pixel, the first vector including one or morevalues descriptive of the first pixel; generate a second vector for thesecond pixel, the second vector including one or more values descriptiveof the second pixel; calculate a dot product value of the first vectorand the second vector; classify the derivative as a reflectancederivative where the dot product value is within a first range ofvalues; classify the derivative as a shading derivative where the dotproduct value is within a second range of values; and classify thederivative as an inconclusive derivative where the dot product value isoutside of the second range of values and the first range of values.

According to another embodiment, a method of editing content using acontent editing device is provided. The content editing device includesmemory and at least one processor. The method comprises acts ofgenerating an illumination map descriptive of a texture within an areaof an image, filling the area with a pattern, and applying theillumination map to the area to generate a textured pattern within thearea.

In the method, the act of generating the illumination map may include anact of generating an illumination map descriptive of shading andreflectance at each pixel within the area. The act of generating theillumination map may include an act of generating an illumination mapincluding a grayscale value corresponding to each pixel within the area.The act of filling the area may include an act of overwriting a subsetof the image data. The act of applying the illumination map may includean act of multiplying one or more values descriptive of each pixel inthe area with a corresponding value in the illumination map.

In the method, the act of generating the illumination map may includeacts of computing derivatives of the area, classifying each derivativeas either a shading derivative or a reflectance derivative, integratingderivatives classified as shading derivatives into a shading image,integrating derivatives classified as reflectance derivatives into areflectance image, and multiplying at least one value of each pixel ofthe shading image by at least one value of each pixel of the reflectanceimage to generate at least one value of each pixel of the illuminationmap. The act of classifying each derivative may include acts ofidentifying a first pixel within the area, the first pixel correspondingto the derivative being classified; identifying a second pixel withinthe area, the second pixel corresponding to the derivative beingclassified; generating a first vector for the first pixel, the firstvector including one or more values descriptive of the first pixel;generating a second vector for the second pixel, the second vectorincluding one or more values descriptive of the second pixel;calculating a dot product value of the first vector and the secondvector; classifying the derivative as a reflectance derivative where thedot product value is within a first range of values; classifying thederivative as a shading derivative where the dot product value is withina second range of values; and classifying the derivative as aninconclusive derivative where the dot product value is outside of thesecond range of values and the first range of values.

According to another embodiment, a non-transitory data storage medium isprovided. The medium stores instructions executable by a programmabledevice. The instructions are configured to execute a method of editingcontent. The method comprising acts of generating an illumination mapdescriptive of a texture within an area of an image, filling the areawith a pattern, and applying the illumination map to the area togenerate a textured pattern within the area.

In the method the instructions are configured to execute, the act ofgenerating the illumination map may include an act of generating anillumination map descriptive of shading and reflectance at each pixelwithin the area. The act of generating the illumination map may includean act of generating an illumination map including a grayscale valuecorresponding to each pixel within the area. The act of filling the areamay include an act of overwriting a subset of the image data. The act ofapplying the illumination map may include an act of multiplying one ormore values descriptive of each pixel in the area with a correspondingvalue in the illumination map.

In the method the instructions are configured to execute, the act ofgenerating the illumination map may include computing derivatives of thearea; classifying each derivative as either a shading derivative or areflectance derivative; integrating derivatives classified as shadingderivatives into a shading image; integrating derivatives classified asreflectance derivatives into a reflectance image; and multiplying atleast one value of each pixel of the shading image by at least one valueof each pixel of the reflectance image to generate at least one value ofeach pixel of the illumination map

Having thus described several aspects of at least one embodiment, it isto be appreciated that various alterations, modifications, andimprovements will readily occur to those skilled in the art. Forinstance, embodiments disclosed herein may also be used in othercontexts wherein the recordings include both audio and video data. Suchalterations, modifications, and improvements are intended to be part ofthis disclosure, and are intended to be within the scope of theembodiments discussed herein. Accordingly, the foregoing description anddrawings are by way of example only.

What is claimed is:
 1. A content editing device comprising: memorystoring image data descriptive of an image; at least one processorcoupled to the memory; and a pattern stamp component executable by theat least one processor and configured to: generate an illumination mapdescriptive of a texture within an area of the image at least in part bybeing configured to: compute derivatives of the area; classify eachderivative as either a shading derivative or a reflectance derivative;integrate derivatives classified as shading derivatives into a shadingimage; integrate derivatives classified as reflectance derivatives intoa reflectance image; and multiply at least one value of each pixel ofthe shading image by at least one value of each pixel of the reflectanceimage to generate at least one value of each pixel of the illuminationmap; fill the area with a pattern; and apply the illumination map to thearea to generate a textured pattern within the area.
 2. The device ofclaim 1, wherein the illumination map is descriptive of shading andreflectance at each pixel within the area.
 3. The device of claim 1,wherein the illumination map includes a grayscale value corresponding toeach pixel within the area.
 4. The device of claim 1, wherein the areais described by a subset of the image data.
 5. The device of claim 1,wherein the pattern stamp component is configured to apply theillumination map at least in part by multiplying one or more valuesdescriptive of each pixel in the area with a corresponding value in theillumination map.
 6. The device of claim 1, wherein the pattern stampcomponent is configured to classify each derivative at least in part bybeing configured to: identify a first pixel within the area, the firstpixel corresponding to the derivative being classified; identify asecond pixel within the area, the second pixel corresponding to thederivative being classified; generate a first vector for the firstpixel, the first vector including one or more values descriptive of thefirst pixel; generate a second vector for the second pixel, the secondvector including one or more values descriptive of the second pixel;calculate a dot product value of the first vector and the second vector;classify the derivative as a reflectance derivative where the dotproduct value is within a first range of values; classify the derivativeas a shading derivative where the dot product value is within a secondrange of values; and classify the derivative as an inconclusivederivative where the dot product value is outside of the second range ofvalues and the first range of values.
 7. A method of editing contentusing a content editing device including memory and at least oneprocessor, the method comprising: generating an illumination mapdescriptive of a texture within an area of an image at least in part by:computing derivatives of the area; classifying each derivative as eithera shading derivative or a reflectance derivative; integratingderivatives classified as shading derivatives into a shading image;integrating derivatives classified as reflectance derivatives into areflectance image; and multiplying at least one value of each pixel ofthe shading image by at least one value of each pixel of the reflectanceimage to generate at least one value of each pixel of the illuminationmap; filling the area with a pattern; and applying the illumination mapto the area to generate a textured pattern within the area.
 8. Themethod of claim 7, wherein generating the illumination map includesgenerating an illumination map descriptive of shading and reflectance ateach pixel within the area.
 9. The method of claim 7, wherein generatingthe illumination map includes generating an illumination map including agrayscale value corresponding to each pixel within the area.
 10. Themethod of claim 7, wherein filling the area includes overwriting asubset of the image.
 11. The method of claim 7, wherein applying theillumination map includes multiplying one or more values descriptive ofeach pixel in the area with a corresponding value in the illuminationmap.
 12. The method of claim 7, wherein classifying each derivativeincludes: identifying a first pixel within the area, the first pixelcorresponding to the derivative being classified; identifying a secondpixel within the area, the second pixel corresponding to the derivativebeing classified; generating a first vector for the first pixel, thefirst vector including one or more values descriptive of the firstpixel; generating a second vector for the second pixel, the secondvector including one or more values descriptive of the second pixel;calculating a dot product value of the first vector and the secondvector; classifying the derivative as a reflectance derivative where thedot product value is within a first range of values; classifying thederivative as a shading derivative where the dot product value is withina second range of values; and classifying the derivative as aninconclusive derivative where the dot product value is outside of thesecond range of values and the first range of values.
 13. Anon-transitory data storage medium storing instructions executable by aprogrammable device, the instructions being configured to execute amethod of editing content, the method comprising: generating anillumination map descriptive of a texture within an area of an image atleast in part by: computing derivatives of the area; classifying eachderivative as either a shading derivative or a reflectance derivative;integrating derivatives classified as shading derivatives into a shadingimage; integrating derivatives classified as reflectance derivativesinto a reflectance image; and multiplying at least one value of eachpixel of the shading image by at least one value of each pixel of thereflectance image to generate at least one value of each pixel of theillumination map; filling the area with a pattern; and applying theillumination map to the area to generate a textured pattern within thearea.
 14. The data storage medium of claim 13, wherein generating theillumination map includes generating an illumination map descriptive ofshading and reflectance at each pixel within the area.
 15. The datastorage medium of claim 13, wherein generating the illumination mapincludes generating an illumination map including a grayscale valuecorresponding to each pixel within the area.
 16. The data storage mediumof claim 13, wherein filling the area includes overwriting a subset ofthe image.
 17. The data storage medium of claim 13, wherein applying theillumination map includes multiplying one or more values descriptive ofeach pixel in the area with a corresponding value in the illuminationmap.